<?php
/**
 *	@Author		Ian-QWL
 *	@Function	基础配置
 *	@Notice		PHP_VERSION >= 5.2 && MYSQL_VERSION >=5.0 	
 */
 
!defined('IAN') && exit('Access Denied');
 
/*定义文件目录*/
define('LIBS', WEB_ROOT.DS.'libs');
define('SUPER', WEB_ROOT.DS.'super');
define('VIEWS', WEB_ROOT.DS.'views');
define('DYN', VIEWS.DS.'dynamic');
define('TPL',  VIEWS.DS.'templates');
define('SUPER', WEB_ROOT.DS.'super');
define('PLNS', WEB_ROOT.DS.'plugins');
define('CONFS', WEB_ROOT.DS.'configs');
define('MODELS', WEB_ROOT.DS.'models');
define('CTRLS', WEB_ROOT.DS.'controllers');


/*软件版本*/
define('VERSION', '1.0');

/*页面字符*/
define('CHARSET', 'UTF-8');

/*单口基址*/
define('BASE', 'index.php?');

/*发布时间*/
define('RELEASE', '20100606');

/*使用内存*/
ini_set('memory_limit', '64M');

/* 报告级别*/
define('ERROR', error_reporting(E_ALL));

/* 请求时间*/
define('STIME', $_SERVER['REQUEST_TIME']);

/*当前地址*/
define('URL', htmlentities($_SERVER["REQUEST_URI"]));

/*当前地址 */
define('PHP_SELF',  htmlentities($_SERVER['PHP_SELF']));

/*GET-参数*/
define('GET_STR', htmlentities($_SERVER['QUERY_STRING']));

/*定义时区*/
define('TIMEZONE', date_default_timezone_set ('Asia/Shanghai'));

/*请求方式*/
define('IS_POST', strtoupper($_SERVER['REQUEST_METHOD']) == 'POST');

/*页面请求*/
define('IS_BROWSER', $_SERVER['HTTP_USER_AGENT'] ? $_SERVER['HTTP_USER_AGENT'] : '');

/*访问协议*/
define('HTTP_TYPE', (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') ? 'https://' : 'http://');

/*过时变量*/
unset($_ENV, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES );


/*版本判断*/
if(PHP_VERSION < '5.2.0' )
{
	exit("版本 < 5.2");
}

/*GD-版本*/
function getGDV()
{
	$gd = gd_info();
	$gdv = $gd['GD Version'];
	return $gdv;
}

/*字符转义*/
@set_magic_quotes_runtime(0);
 if (!get_magic_quotes_gpc())
{
   	$_GET  		= addslashes_deep($_GET);
    $_POST 		= addslashes_deep($_POST);
	$_FILES 	= addslashes_deep($_FILES);	
 	$_COOKIE   	= addslashes_deep($_COOKIE);
	$_SERVER	= addslashes_deep($_SERVER);
	$_REQUEST	= addslashes_deep($_REQUEST);
}
 
function addslashes_deep(&$value)
{
    if (empty($value))
    {
        return $value;
    }
    else
    {
        return is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value);
    }
}

/*页面执行时间*/
//echo $exetime = time()-STIME;

?>